-- CALC_BLOOD_THRONE_BONUS

-- 计算鲜血王座奖励
-- @param user 玩家对象
return function(user)
    local petPositon = FormulaM.invoke("GET_PET_POSITION_LIST");
    local highPet = petPositon["high"];
    local lowlyPet = petPositon["lowly"];

    local ret = {};

    local bonusTimes = CaveHideItemM.getCaveBuildingBonusTimes(792);

    -- 根据出战冈布奥判断获得奖励的类型，和提示
    local petId = ME.user:getActivePet().classId;

    if table.indexOf(highPet, petId) ~= -1 then
        -- 地位高的冈布奥
        ret["bonus"] = {{2, "attack", 3},{2, "magic", 3},{2, "hp", 50}, {2,"mp", 50}, {2, "search_point", 500}};
        if bonusTimes < 3 then
            ret["bonus"] = table.append(ret["bonus"], {{2, "gem", 3}});
        end

    elseif table.indexOf(lowlyPet, petId) ~= -1 then
        -- 地位低的冈布奥
        ret["cost_per_attrib"] = {{2, "hp", 500},{2, "mp", 500}};

    else
        ret["bonus"] = {};
    end

    return ret;
end
